package com.itheima.CSM_bacK.aaaControllers;

import com.itheima.CSM_bacK.aabServices.Serv.OrderServ;
import com.itheima.common.entity.PageResult;
import com.itheima.common.entity.QueryPageBean;
import com.itheima.common.entity.Result;
import com.itheima.pojo.DTO.DTOoSetUP;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderServ orderServ;


    @PostMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean kk) {
        PageResult kkk = orderServ.findPage(kk);
        return kkk;
    }


    @PostMapping("/update")
    public Result update(@RequestBody DTOoSetUP kk) {
        orderServ.update(kk);
        return new Result(true, "修改预约状态成功");


    }
}
